<template>
    <div>
        <div id="nav">
        <h2>我的一个vue 应用</h2>
        <!-- <router-link to="/">Home</router-link> |
        <router-link to="/about">About</router-link> | 
        <router-link to="/book">书籍列表</router-link> |
        <router-link to="/game">游戏</router-link> -->

        <button @click="go('Home')">Home</button>
        <button @click="go('About')">About</button>
        <button  @click="go('youxi')">游戏</button>

        </div>
    </div>
</template>

<script>
    export default {
        name:'Menu',
        methods:{
            go(name){

                this.$router.push({name})
            }
        }
    }
</script>

<style lang="scss" scoped>

</style>